package com.ihr360.shared.sequence.dto.mapped;


import com.ihr360.shared.entitywithlistener.NumberIdWithTime;
import com.vladmihalcea.hibernate.type.json.JsonStringType;
import org.hibernate.annotations.TypeDef;
import org.hibernate.annotations.TypeDefs;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

/**
 * 序列号生成器
 *
 * @author davidwei
 */
@MappedSuperclass
@TypeDefs({
        @TypeDef(name = "json", typeClass = JsonStringType.class)
})
public class Ihr360SequenceBase extends NumberIdWithTime<Long> {
    /**
     * 模块
     */
    @Column(nullable = false, length = 30)
    private String bizModel;


    @Column(nullable = false, length = 50)
    private String bizModeDesc;

    @Column(length = 21,columnDefinition = "bigint(21) default 1")
    private Long startId;

    @Column(length = 12,columnDefinition = "int(12) default 1")
    private Integer step;

    @Column(nullable = true, length = 200)
    private String template;



    @Column(nullable = true, length = 4)
    private String sectionSeparator;

    @Column(length = 8)
    private Integer serialLength;

    /**
     * 序列号分类标志
     */
    @Column(nullable = true, length = 100)
    private String categoryId;

    public String getBizModel() {
        return bizModel;
    }

    public void setBizModel(String bizModel) {
        this.bizModel = bizModel;
    }

    public String getBizModeDesc() {
        return bizModeDesc;
    }

    public void setBizModeDesc(String bizModeDesc) {
        this.bizModeDesc = bizModeDesc;
    }

    public Long getStartId() {
        return startId;
    }

    public void setStartId(Long startId) {
        this.startId = startId;
    }

    public Integer getStep() {
        return step;
    }

    public void setStep(Integer step) {
        this.step = step;
    }

    public String getTemplate() {
        return template;
    }

    public void setTemplate(String template) {
        this.template = template;
    }


    public String getSectionSeparator() {
        return sectionSeparator;
    }

    public void setSectionSeparator(String sectionSeparator) {
        this.sectionSeparator = sectionSeparator;
    }

    public Integer getSerialLength() {
        return serialLength;
    }

    public void setSerialLength(Integer serialLength) {
        this.serialLength = serialLength;
    }

    public String getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }
}